const { Sequelize }  = require('sequelize');
const dbConfig = require('./config/db.config')

const sequelize = new Sequelize(dbConfig.DB, dbConfig.USER, dbConfig.PASSWORD,{
    host: dbConfig.HOST,
    dialect: dbConfig.dialect,
    pool: dbConfig.pool
});

const db = {};

db.Sequelize = sequelize;
db.sequelize = sequelize;

module.exports = db;